package com.tydic.springboot.controller;

import com.tydic.springboot.model.FileVo;
import com.tydic.springboot.model.Student;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.*;
import org.springframework.web.multipart.MultipartFile;

import java.util.List;

@RestController
@RequestMapping("/file")
public class FileController {

    @PostMapping("uploadFile")
    public void uploadFile(@RequestParam("file") MultipartFile file, Student student) {
        String originalFilename = file.getOriginalFilename();
        System.out.println(originalFilename);
    }

    @PostMapping("uploadFile2")
    public void uploadFile2(FileVo fileVo) {
        String s = fileVo.toString();
        System.out.println(">>>>>>>>" + s);
    }

}
